<script setup lang="ts">
import { ref } from 'vue';
import { Action } from './lib/action';

const appInfo = ref();
const ipcHandle = async () => {
  appInfo.value = await Action.getAppInfo();
}


</script>

<template>
  <img alt="logo" class="logo" src="./assets/electron.svg" />
  <div class="creator">Powered by electron-vite</div>
  <div class="text">
    Build an Electron app with
    <span class="vue">Vue</span>
    and
    <span class="ts">TypeScript</span>
  </div>
  <p class="tip">Please try pressing <code>F12</code> to open the devTool</p>
  <div class="actions">
    <div class="action">
      <div class="app-info">
        {{ JSON.stringify(appInfo, null, 2) }}
      </div>

      <a target="_blank" rel="noreferrer" @click="ipcHandle">点击获取appInfo</a>
    </div>
  </div>
</template>
<style>
.app-info {
  font-size: 14px;
  white-space: normal;
  width: 200px;

}
</style>
